-- target_attrib
-- created by zhuangsl
-- 对特定怪物造成额外伤害

return {
    apply = function(prop, baseValue)
        -- 返回额外的伤害值
        return math.modf(baseValue * prop[3] / 1000);
    end,

    desc = function(prop)
        local row = PropM.getRow(prop[1]);
        local desc = row.desc;

        local base_class_id = tonumber(prop[2]);
        desc = string.gsub(desc, "{0}", MonsterM.query(base_class_id, "name"));

        local v = math.modf(prop[3] / 10);
        desc = string.gsub(desc, "{1}", v);

        return desc;
    end,

    record = function(target, prop, path)
        return false;
    end 
};